package wli.web.util;

import java.util.*;

public class MyXml {
    public static StringBuffer getComments(String comments) {
	StringBuffer sbf = new StringBuffer();
	sbf.append("\n<!-- ");
	
	if(comments != null && comments.length()>0) {
	    if(comments.length()>=80) {
		sbf.append(comments);
	    }
	    else {
		for (int i=0; i<40-comments.length()/2; i++) {
		    sbf.append("=");
		}
		sbf.append(" "+comments+" ");
		for (int i=0; i<40-comments.length()/2; i++) {
		    sbf.append("=");
		}
	    }
	}

	sbf.append(" -->\n");
	return sbf;
    }
}





